The basic command for putting something into the index is
\index
, as in standard . But \index
does not
print its argument. To index a word that actually appears in the text
say \ix{...}
. To index mathematical notation say
\ixn$...$
or \ixninv$...$
, depending on whether the
contents should appear or not. And, just for symmetry, you can also
use \ixinv
, which equals \index
:
Visible & ix & ixnInvisible & ixinv & ixninv
An index entry is made automatically for any \label
or
\ref
command. In the second case the entry goes into the index
file preceded by a %
.
Remember that, unless you have issued the
command \autolabelfalse
, there are lots of situations in which
a label, and consequently an index entry, is generated automatically:
in particular, this happens for each sectioning command
(Labels and Cross-References) and for each tagged
theorem, lemma, and so on (Theorems and Their Friends).
This provides a
wealth of index entries, which later you can winnow out
semi-automatically, if necessary, since entries of this sort appear in
quotation marks, preceded by their type. You can see all the entries
that a given page contributes to the index by looking at the small
print on the top left of the page when proofing mode is on
(Proofing Aids).
to *The geom
style modifies the \theindex
format of standard
so that the index is printed in smaller type. Moreover, it
achieves a double-column format not by using standard 's
\twocolumn
command, which starts a new page, but rather
Frank Mittelbach's multicols
environment [#!Mittelbach!#],
which is implemented in the file multicol.sty
. Using this
environment you can have single-column and double-column text on the
same page. If you want to add an explanation before the index, for
example, you might say something like this:
\begin{theindex} \null % this avoids what seems to be a bug in multicol.sty \end{multicols} % end double column format started by \begin{theindex} Numbers in parentheses refer to pages where the entry should be discussed but isn't, due to laziness on the author's part. \begin{multicols}2 % restart double column format \item aardvark... \end{theindex}
Support for a glossary is somewhat more extensive than in standard
. You can mark a word as a glossary entry by saying
\glo{...}
; this causes a dagger to be placed before the
word, and an index entry for the word to be generated in the file jobname.idx
, preceded by \dag
.
to *Note that the
geom
style does not use a separate jobname.glo
file; although standard 's \glossary
command is still
available if you insist in writing entries to that file, this command
has not been made robust in the way that \index
and \label
have. (See No More Fragile Commands.)
The glossary itself is
delimited by \begin{theglossary}
and \end{theglossary}
.
Glossary entries start like this:
\entry{doohickey} ... \entry[\cite{...}]{thingamajig} ...The entry name is printed in boldface, followed by a period. The contents of the optional argument are printed immediately after the entry name, before the period. The comments made above about double-column formatting apply to the glossary as well.
The table of contents is treated in much the same way as in standard
, but there is one important difference: starred sectioning
commands, like \section*
, do show up in the table of contents,
unless you've said \starredcontentsfalse
.
Since one generally doesn't want the table of contents
to include an entry for the table of contents itself,
the definition of \tableofcontents
in
geomart.sty
starts like this:
\def\tableofcontents{{\starredcontentsfalse\section*{Contents}...}}The extra pair of braces limits the action of
\starredcontentsfalse
to this entry only.